package com.jmgd.cjlx.param.metuan;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;

public class LimitSaleInfoDeserializer extends JsonDeserializer<LimitSaleInfo> {
    @Override
    public LimitSaleInfo deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
            throws IOException, JsonProcessingException {
        String json = jsonParser.getText();
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(json, LimitSaleInfo.class);
    }
}

